Given
path 'geonetwork/srv/dut/inspire'
0.000
And
param service = 'CSW'
0.000
And
param version = '2.0.2'
0.000
And
param request = 'GetRecordById'
0.000
And
param id = 'krw-782cab20-8328-45f1-a9b2-c27d07c14066'
0.000
And
param elementsetname = 'full'
0.000
And
param outputSchema = 'http://www.isotc211.org/2005/gmd'
0.000
And
match /GetRecordByIdResponse/MD_Metadata/fileIdentifier/CharacterString == 'krw-782cab20-8328-45f1-a9b2-c27d07c14066'
0.002
*
def scopecode = get response //MD_Metadata/hierarchyLevel/MD_ScopeCode/@codeListValue
0.000
*
def title = get response //citation/CI_Citation/title/CharacterString
0.000
*
def email = get response //electronicMailAddress/CharacterString
0.000
*
def organisationpath = karate.get('//MD_Metadata/contact/CI_ResponsibleParty/organisationName/CharacterString')
0.000
*
def metadataStandardVersionpath = karate.get ('/GetRecordByIdResponse/MD_Metadata/metadataStandardVersion/CharacterString')
0.000
*
def MD_DataIdentificationCitationAnchor = karate.get ('/GetRecordByIdResponse/MD_Metadata/identificationInfo/MD_DataIdentification/citation/CI_Citation/identifier//@href')
0.000
*
def mystorage = Java.type('storage.DataStorage')
0.000
*
def db = new mystorage
0.000
*
eval db.writeln('"krw-782cab20-8328-45f1-a9b2-c27d07c14066","'+ title + '","' + (MD_DataIdentificationCitationAnchor ? MD_DataIdentificationCitationAnchor : 'no MD_DataIdentificationCitationAnchor') + '","' + (organisationpath ? organisationpath : 'no organisationName found in dataset record') + '","'+ email + '","' + (metadataStandardVersionpath ? metadataStandardVersionpath : 'no metadatastandard path found') + '",' , outputpath + scopecode + 's.csv')
0.003
*
eval db.writeln('"krw-782cab20-8328-45f1-a9b2-c27d07c14066","'+ title + '","' + (MD_DataIdentificationCitationAnchor ? MD_DataIdentificationCitationAnchor : 'no MD_DataIdentificationCitationAnchor') + '","' + (organisationpath ? organisationpath : 'no organisationName found in dataset record') + '","'+ email + '","' + (metadataStandardVersionpath ? metadataStandardVersionpath : 'no metadatastandard path found') + '",' , outputpath + scopecode + 's-' + (organisationpath ? organisationpath : 'no organisationName found in dataset record') + '.csv')
0.003